/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       ambientsoundsource.cpp
 * Author:     twoja stara
 * Created on: 2009-07-14
 *
 **********************************************************************************************************************/

#include "ambientsoundsource.h"

namespace mGameEngine
{

namespace Audio
{

AmbientSoundSource::AmbientSoundSource() :
    SoundSource()
{
}

AmbientSoundSource::AmbientSoundSource(Sound *sound) :
    SoundSource(sound)
{
}

AmbientSoundSource::~AmbientSoundSource()
{
}

void AmbientSoundSource::set() const
{
    // sound isn't playing
    if(!isPlaying())
    {
        return;
    }

    // set sound source
    alSourcef(_source, AL_GAIN, _gain);
    alSourcef(_source, AL_PITCH, 1.0f);
    alSourcefv(_source, AL_POSITION, Vector3(0.0f, 0.0f, 0.0f));
    alSourcefv(_source, AL_VELOCITY, Vector3(0.0f, 0.0f, 0.0f));
}

}
}

